import java.util.*;

class ListNode {
    int val;
    ListNode next;
    ListNode() {}
    ListNode(int val) {
        this.val = val;
    }
}
class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode() {}
    TreeNode(int val) { this.val = val; }
    TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}

public class Test {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            char[][] chessboard = new char[20][20];
            // 初始化棋盘
            for(int i = 0; i < 20; i++){
                String str = in.next();
                for(int j = 0; j < 20; j++){
                    chessboard[i][j] = str.charAt(j);
                }
            }
            if(check(chessboard, '*') || check(chessboard, '+')){
                System.out.println("Yes");
            }else {
                System.out.println("No");
            }
        }
    }
    //                         棋盘              要匹配的棋子
    public static boolean check(char[][] chessboard, char checkBoard){
        for(int i = 0; i < 20; i++){
            for(int j = 0; j < 20; j++){
                if(chessboard[i][j] == checkBoard){
                    // 下
                    if(j + 4 < 20){
                        if(chessboard[i][j+1] == checkBoard && chessboard[i][j+2] == checkBoard
                                && chessboard[i][j+3] == checkBoard && chessboard[i][j+4] == checkBoard){
                            return true;
                        }
                    }
                    // 右
                    if(i + 4 < 20){
                        if(chessboard[i+1][j] == checkBoard && chessboard[i+2][j] == checkBoard
                                && chessboard[i+3][j] == checkBoard && chessboard[i+4][j] == checkBoard){
                            return true;
                        }
                    }
                    // 右下
                    if(j + 4 < 20 && i + 4 < 20){
                        if(chessboard[i+1][j+1] == checkBoard && chessboard[i+2][j+2] == checkBoard
                                && chessboard[i+3][j+3] == checkBoard && chessboard[i+4][j+4] == checkBoard){
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }

    public static void main23(String[] args) {

        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int len = in.nextInt();
            int[] people = new int[len];
            for(int i = 0; i < len; i++){
                people[i] = in.nextInt();
            }
            int maxUpSize = 1;
            int[] dp = new int[len];
            dp[0] = 1;
            for(int i = 1; i < len; i++){
                for(int j = i-1; j >= 0; j--){
                    if(people[i] > people[j]){
                        dp[i] = Math.max(dp[i],dp[j]+1);
                    }
                }
                if (dp[i] == 0){
                    dp[i] = 1;
                }
                maxUpSize = Math.max(maxUpSize,dp[i]);
            }
            System.out.println(maxUpSize);
        }
    }

    public static void main0(String[] args) {
        String source = "mississippi";
        String target = "issip";
        System.out.println(strStr(source, target));
    }
    public static int strStr(String source, String target) {
        if(source.equals("") && target.equals("")){
            return 0;
        }
        int len1 = source.length();
        int len2 = target.length();
        if(len1 < len2) {
            return -1;
        }

        int index = 0;// source字符串的下标
        while(index < len1){
            char first = target.charAt(0);

            while(index < len1 && source.charAt(index) != first){
                index++;
            }
            if(index == len1){
                break;
            }
            // 匹配第二个
            for(int sourceSet = index + 1,targetSet = 1; ;){
                while(sourceSet < len1 && targetSet < len2 && source.charAt(sourceSet) == target.charAt(targetSet)){
                    sourceSet++;
                    targetSet++;
                }
                if(targetSet == len2){
                    return index;
                }else{
                    index++;
                    break;
                }
            }
        }

        return -1;
    }


    public static void main18(String[] args) {
        int[] nums = {-2,0,0,2,2};
        System.out.println(threeSum(nums));
    }
    static List<List<Integer>> ret = new ArrayList<>();
    public static List<List<Integer>> threeSum(int[] nums) {
        Arrays.sort(nums);
        for(int left = 0; left < nums.length - 2; left++){
            if(nums[left] > 0){
                return ret;
            }
            if (left > 0 && nums[left] == nums[left - 1]){
                continue;// 左去重
            }
            int middle = left + 1;
            int right = nums.length-1;

            while(middle < right){


                if (middle > left + 1 && nums[middle] == nums[middle - 1]){
                    middle++;
                    continue;// 中去重
                }
                if (nums[left] + nums[middle] + nums[right] == 0){
                    ret.add(Arrays.asList(nums[left],nums[middle],nums[right]));
                    middle++;
                    right--;
                } else if (nums[left] + nums[middle] + nums[right] > 0){
                    right--;
                } else {
                    middle++;
                }
            }
        }
        return ret;
    }


    public static void main17(String[] args) {
        System.out.println(minWindow("a", "aa"));
        Set<Integer> set = new HashSet<>();
        List<List<Integer>> ret = new ArrayList<>();
        ret.add(Arrays.asList(1,2,3));

    }
    public static String minWindow(String s, String t) {
        char[] target = t.toCharArray();
        char[] chars = s.toCharArray();
        int wordsNum = 0;// 滑动窗口中包含的 t中的字符个数
        int[] words = new int[128];// 'A' ~ 'z'
        int[] frequency = new int[128];// 滑动窗口字母出现频率
        int left = 0;// 滑动窗口左边界
        int right = 0;// 滑动窗口右边界
        int minLeft = 0;// 最小窗口左边界
        int minLen = Integer.MAX_VALUE;// 最小长度

        for (char c : target) {
            words[c]++;// 各个字母出现的频率
        }

        for( ; right < chars.length; right++){
            // 不含该字符，直接++
            if(words[chars[right]] == 0){
                continue;
            }
            if (frequency[chars[right]] < words[chars[right]]){
                wordsNum++;
            }
            frequency[chars[right]]++;

            while (wordsNum == target.length){

                if (right - left + 1 < minLen){
                    minLen = right - left + 1;
                    minLeft = left;
                }
                if (!t.contains(chars[left]+"")){
                    left++;
                }else if (frequency[chars[left]] > words[chars[left]]){
                    frequency[chars[left++]]--;
                }else {
                    frequency[chars[left++]]--;
                    wordsNum--;
                }
            }
        }

        return minLen == Integer.MAX_VALUE ? "" : s.substring(minLeft,minLeft+minLen);
    }



    public static void main16(String[] args) {
        int[] fruits = {3,3,3,1,2,1,1,2,3,3,4};
        System.out.println(totalFruit(fruits));
    }
    public static int totalFruit(int[] fruits) {
        Set<Integer> set = new HashSet<>();// 采摘的水果种类
        int fruitsNum = 0;
        int tempNum = 0;

        int left = 0;// 左边界
        for(int right = 0; right < fruits.length; right++){
            if(set.size() < 2 || set.contains(fruits[right])){
                set.add(fruits[right]);
                tempNum++;
                fruitsNum = Math.max(fruitsNum,tempNum);
                continue;
            }

            // 碰到新水果
            // 移除左边水果种类,直至剩下一种水果
            left = right - 1;
            int leftFruit = fruits[left];
            while(fruits[left] == leftFruit){
                left--;
            }
            set.remove(fruits[left]);
            set.add(fruits[right]);
            left = left + 1;
            tempNum = right - left + 1;
        }
        return fruitsNum;
    }


    public static void main15(String[] args) {
        System.out.println(backspaceCompare(
                "xywrrmp","xywrrmu#p"));
    }
    public static boolean backspaceCompare(String s, String t) {
        int sSpace = 0;
        int tSpace = 0;
        int is = s.length()-1, it = t.length()-1;
        for(; is >= 0 || it >= 0;){
            while(is >= 0 && s.charAt(is) == '#'){
                while(is >= 0 && s.charAt(is) == '#'){
                    sSpace++;
                    is--;
                }
                // 抵消掉#
                while(is >= 0 && s.charAt(is) != '#' && sSpace > 0){
                    sSpace--;
                    is--;
                }
            }
            while(it >= 0 && t.charAt(it) == '#'){
                while(it >= 0 && t.charAt(it) == '#'){
                    tSpace++;
                    it--;
                }
                // 抵消掉#
                while(it >= 0 && t.charAt(it) != '#' && tSpace > 0){
                    tSpace--;
                    it--;
                }
            }
            // 来到非#
            if(is >= 0 && it >= 0 && s.charAt(is) == t.charAt(it)){
                // 相等
                is--;
                it--;
            }else {
                break;
            }
        }
        if(is < 0 && it < 0) {
            // 都走完了
            return true;
        }
        return false;
    }


    public static void main14(String[] args) {
        System.out.println(isPerfectSquare(808201));
    }
    public static boolean isPerfectSquare(int num) {
        if(num <= 1) {
            return true;
        }
        int left = 1;
        int right = num / 2;
        while(left <= right){
            int middle = (left + right) >> 1;
            if((long)middle*middle > num){
                right = middle - 1;
            }else if((long)middle*middle < num){
                left = middle + 1;
            }else {
                return true;
            }
        }
        return false;
    }



    public static void main13(String[] args) {
        int[] nums = {};
        System.out.println(largestRectangleArea(nums));
    }
    public static int largestRectangleArea(int[] heights) {
        int[] left = new int[heights.length];
        int[] right = new int[heights.length];
        left[0] = 0;
        right[heights.length-1] = heights.length - 1;

        for(int i = 1; i < heights.length; i++){
            int j = i - 1;
            while(j >= 0 && heights[j] >= heights[i]){
                j--;
            }
            left[i] = j + 1;

        }
        for(int i = heights.length - 2; i >= 0; i--){
            int j = i + 1;
            while(j < heights.length && heights[j] >= heights[i]){
                j++;
            }
            right[i] = j - 1;
        }

        int sum = 0;
        for(int i = 0; i < heights.length; i++){
            int h = heights[i];
            int w = right[i] - left[i] + 1;
            if(h * w > 0){
                sum = Math.max(sum, h * w);
            }
        }

        return sum;
    }

    public static void main12(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String shortStr = in.next();
            String longStr = in.next();
            if(shortStr.length() > longStr.length()){
                String tempStr = shortStr;
                shortStr = longStr;
                longStr = tempStr;
            }
            char[] charsS = shortStr.toCharArray();
            char[] charsL = longStr.toCharArray();
            int[][] dp = new int[charsS.length][charsL.length];
            for (int i = 0; i < dp.length; i++) {
                Arrays.fill(dp[i],Integer.MAX_VALUE);
            }
            // 初始化第一行
            dp[0][0] = charsS[0] == charsL[0] ? 0 : 1;
            for (int i = 1; i < dp[0].length; i++) {
                if(charsS[0] == charsL[i] && charsL[i] != charsL[i-1]){
                    dp[0][i] = dp[0][i-1];
                }else {
                    dp[0][i] = dp[0][i-1] + 1;
                }
            }
            // 初始化第一列
            for (int i = 1; i < dp.length; i++) {
                if(charsL[0] == charsS[i] && charsS[i] != charsS[i-1]){
                    dp[i][0] = dp[i-1][0];
                }else {
                    dp[i][0] = dp[i-1][0] + 1;
                }
            }

            for (int i = 1; i < dp.length; i++) {
                for (int j = 1; j < dp[0].length; j++) {
                    if(charsS[i] == charsL[j]){
                        dp[i][j] = Math.min(dp[i-1][j-1],Math.min(dp[i-1][j],dp[i][j-1])+1);
                    }else{
                        dp[i][j] = Math.min(dp[i-1][j-1],Math.min(dp[i-1][j],dp[i][j-1])) + 1;
                    }
                }
            }
            System.out.print(dp[charsS.length-1][charsL.length-1]);
        }
    }

    public static void main11(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int monsterNum = in.nextInt();
            int init = in.nextInt();
            for(int i = 0; i < monsterNum; i++){
                int monster = in.nextInt();
                if(monster <= init){
                    init += monster;
                }else {
                    int add = max(init,monster);
                    init += add;
                }
            }
            System.out.println(init);
        }
    }
    public static int max(int num1, int num2){
        int min = Math.min(num1,num2);
        int max = Math.max(num1,num2);
        for(int i = min; i >= 0; i++){
            if(max % i == 0 && min % i == 0){
                return i;
            }
        }
        return 1;
    }


    public static void main10(String[] args) {
        Scanner in = new Scanner(System.in);
        String str1 = in.next();
        String str2 = in.next();
        int rows = str1.length();
        int lines = str2.length();
        int maxLen = 0;// 最长子串长度
        int[][] dp = new int[rows+1][lines+1];
        for(int i = 1; i < rows; i++){
            for(int j = 1; j < lines; j++){
                if(str1.charAt(i) == str2.charAt(j)){
                    dp[i][j] = dp[i-1][j-1] + 1;
                    if(maxLen < dp[i][j]){
                        maxLen = dp[i][j];
                    }
                }else {
                    dp[i][j] = 0;
                }
            }
        }
        System.out.print(maxLen);
    }


    public static void main9(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int nums = in.nextInt();// 总组数
            for(int i = 0; i < nums; i++){
                int n = in.nextInt();
                int k = in.nextInt();
                int[] pokers = new int[2*n];
                for(int j = 0; j < 2*n; j++){
                    pokers[j] = in.nextInt();
                }
                pokers = wash(pokers,k);
                for(int m = 0; m < pokers.length; m++){
                    System.out.print(pokers[m]+" ");
                }
                System.out.println();
            }
        }
    }
    public static int[] wash(int[] pokers,int k){
        if(k == 0) return pokers;
        int[] ret = new int[pokers.length];
        int odd = 0;// 奇数位
        int even = pokers.length / 2;// 偶数位
        int index = 0;
        while(even < pokers.length){
            ret[index++] = pokers[odd];
            ret[index++] = pokers[even];
            odd++;
            even++;
        }
        return wash(ret,k-1);
    }





    static int result = 0;
    public static void main8(String[] args) throws InterruptedException {

        Thread t1 = new Thread(() -> {
            for (int i = 0; i < 50; i++) {
                result++;
            }
        });
        t1.start();
        Thread t2 = new Thread(() -> {
            for (int i = 0; i < 50; i++) {
                result++;
            }
        });
        t2.start();
        t1.join();
        t2.join();
        System.out.println(result);
    }


    public static void main7(String[] args) {
        integerBreak(10);
    }
    public static int integerBreak(int n) {
        int[] dp = new int[n+1];
        dp[1] = 1;
        dp[2] = 1;

        for(int i = 3; i <= n; i++){
            for(int j = 1; j <= i-1; j++){
                dp[i] = Math.max(dp[i],Math.max(dp[i-j]*j,(i-j)*j));
            }
        }

        return dp[n];
    }


    public static void main6(String[] args) {
        int[][] obstacleGrid = {{0,0,0},{0,1,0},{0,0,0}};
        uniquePathsWithObstacles(obstacleGrid);
    }
    public static int uniquePathsWithObstacles(int[][] obstacleGrid) {
        int rows = obstacleGrid.length;
        int lines = obstacleGrid[0].length;
        int[][] dp = new int[rows][lines];

        // 初始化第一列
        for(int i = 0; i < rows; i++){
            if(obstacleGrid[i][0] == 0){
                dp[i][0] = 1;// 此点能到达
            }else {
                break;
            }
        }
        // 初始化第一行
        for(int i = 0; i < lines; i++){
            if(obstacleGrid[0][i] == 0){
                dp[0][i] = 1;// 此点能到达
            }else {
                break;
            }
        }
        for(int i = 1; i < rows; i++){
            for(int j = 1; j < lines; j++){
                dp[i][j] = dp[i][j-1] + dp[i-1][j];
            }
        }
        return dp[rows-1][lines-1];

    }



    public int minCameraCover(TreeNode root) {
        // 后序遍历 --- 左右上,向上搜索
        int ret = 0;
        if (root == null) return 0;
        ret += minCameraCover(root.left);
        ret += minCameraCover(root.right);
        if (root.left != null && root.left.val == 0 || root.right != null && root.right.val == 0){
            ret++;
            root.val = 1;
        }

        if (root.val == 0) ret++;
        return ret;
    }



    public static List<Integer> spiralOrder(int[][] matrix) {
        List<Integer> ret = new ArrayList<>();
        int top = 0;
        int right = matrix[0].length - 1;
        int bottom = matrix.length - 1;
        int left = 0;
        while(left < right || top < bottom) {
            // 上
            for(int i = left; i < right; i++) {
                ret.add(matrix[top][i]);
            }
            // 右
            for(int i = top; i < bottom; i++) {
                ret.add(matrix[i][right]);
            }
            if (top < bottom) {
                // 下
                for(int i = right; i > left; i--) {
                    ret.add(matrix[bottom][i]);
                }
            }
            if (left < right) {
                // 左
                for(int i = bottom; i > top; i--) {
                    ret.add(matrix[i][left]);
                }
            }
            top++;
            bottom--;
            left++;
            right--;
            if (left >= right || top >= bottom) break;
        }
        if (top == bottom && left == right && top == left) {
            ret.add(matrix[top][top]);
        }
        return ret;
    }

    public static void main4(String[] args) {
        int W = 6;
        int H = 5;
        int count = 0;
        for(int i = 0;i < W; i+=4) {
            int temp = 0;
            for(int j = 0; j < H; j+=4) {
                temp++;
                if(j + 1 < H) {
                    temp++;
                }
            }
            if(i + 1 < W) {
                temp *= 2;
            }
            count += temp;
        }
        for(int i = 2;i < W; i+=4) {
            int temp = 0;
            for(int j = 2; j < H; j+=4) {
                temp++;
                if(j + 1 < H) {
                    temp++;
                }
            }
            if(i + 1 < W) {
                temp *= 2;
            }
            count += temp;
        }
        System.out.println(count);
    }


    public static void main3(String[] args) {
        System.out.println(StrToInt("-2147483647"));
    }
    public static int StrToInt(String str) {
        int ret = 0;
        int index = 0;
        boolean flag = false;
        if(str.charAt(index) == '-') {
            flag = true;
            index++;
        }else if(str.charAt(index) == '+') {
            index++;
        }
        for(int i = index; i < str.length(); i++) {
            char c = str.charAt(i);
            if(c <= '9' && c >= '0') {
                ret = ret * 10 + (c - 48);
            }else {
                return 0;
            }
        }
        return flag ? -ret : ret;
    }

    public static int func1(int b){
        try {
            b += 10;
            return b;
        }catch (Exception e){

        }finally {
            b += 10;
            return b;
        }
    }

    public boolean canConstruct(String ransomNote, String magazine) {
        Map<Character,Integer> mapM = new HashMap<>();
        for(int i = 0; i < magazine.length(); i++) {
            char c = magazine.charAt(i);
            int val = mapM.getOrDefault(c,0);
            mapM.put(c,val + 1);
        }

        for(int i = 0; i < ransomNote.length(); i++) {
            char c = ransomNote.charAt(i);
            if(mapM.containsKey(c)) {
                int val = mapM.get(c);
                val--;
                if(val == 0) {
                    mapM.remove(c);
                }else {
                    mapM.put(c,val);
                }
            }else {
                return false;
            }
        }
        return true;
    }

    public boolean isAnagram(String s, String t) {
        if(s.length() != t.length()) return false;
        Map<Character,Integer> mapS = new HashMap<>();
        Map<Character,Integer> mapT = new HashMap<>();
        for(int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            int val = mapS.getOrDefault(c,0);
            mapS.put(c,val + 1);
        }
        for(int i = 0; i < s.length(); i++) {
            char c = t.charAt(i);
            int val = mapT.getOrDefault(c,0);
            mapT.put(c,val + 1);
        }
        Set<Map.Entry<Character, Integer>> entries = mapS.entrySet();
        for (Map.Entry<Character, Integer> entry : entries) {
            if (!mapT.containsKey(entry.getKey()) || !mapT.get(entry.getKey()).equals(entry.getValue())){
                return false;
            }
        }
        return true;
    }

    public static void main5(String[] args) {
        ListNode node1 = new ListNode(1);
        ListNode node2 = new ListNode(2);
        ListNode node3 = new ListNode(3);
//        ListNode node4 = new ListNode(4);
        node1.next = node2;
        node2.next = node3;
//        node3.next = node4;
        swapPairs(node1);

    }
    public void main4() {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {// 注意，如果输入是多个测试用例，请通过while循环处理多个测试用例
            String a = in.nextLine();
            String b = in.nextLine();
            String temp = a;
            int count = 0;

            for(int i = 0; i < temp.length(); i++) {
                a = temp.substring(0, i) + b + temp.substring(i);
                if(isPalindrome(a)) {
                    count++;
                }
            }
            if(isPalindrome(temp + b)) {
                count++;
            }

            System.out.println(count);
        }
    }


    public static ListNode swapPairs(ListNode head) {
        if(head == null || head.next == null) {
            return head;
        }
        ListNode cur = head;
        ListNode newNode = new ListNode(-1);
        ListNode temp = newNode;

        while(cur != null) {
            if(cur.next != null) {
                temp.next = cur.next;
                temp = temp.next;
                ListNode prev = temp.next;
                temp.next = cur;
                cur.next = prev;
                cur = cur.next;
                temp = temp.next;
            }else {
                temp.next = cur;
                temp = temp.next;
            }
        }
        return newNode.next;
    }


    // 判断是否是回文
    public static boolean isPalindrome(String s) {
        int left = 0;
        int right = s.length() - 1;
        while(left < right) {
            if(s.charAt(left) != s.charAt(right)) {
                return false;
            }
            left++;
            right--;
        }
        return true;
    }

    public static void main2(String[] args) {
//        MyArrayList myArrayList = new MyArrayList();
//        myArrayList.add(1);
//        myArrayList.add("hello");
//        int array1 = (int)myArrayList.get(0);
//        String array2 = (String)myArrayList.get(1);

//        MyArrayList<Integer> myArrayList1 = new MyArrayList<>();
//        myArrayList1.add(1);
//        myArrayList1.add(3);
//        // myArrayList1.add("world");// 这里会报错，因为传入的数据不是指定的类型
//        int I1 = myArrayList1.get(0);
//        MyArrayList<String> myArrayList2 = new MyArrayList<>();
//        myArrayList2.add("hello");
//        myArrayList2.add("world");
//        String s1 = myArrayList2.get(0);


        MyArrayList<Integer> myArrayList1 = new MyArrayList<>();
        MyArrayList<String> myArrayList2 = new MyArrayList<>();
        MyArrayList<Boolean> myArrayList3 = new MyArrayList<>();
        System.out.println(myArrayList1.getClass());
        System.out.println(myArrayList2.getClass());
        System.out.println(myArrayList3.getClass());
        System.out.println();

    }

    public static void main1(String[] args) {
//        int[] nums = {-10000,-9999,-7,-5};
//        System.out.println(Arrays.toString(sortedSquares(nums)));
//        int[] nums = {2,3,1,2,4,3};
//        System.out.println(minSubArrayLen(7, nums));
//
//        int[] fruits = {3,3,3,1,2,1,1,2,3,3,4};
//        System.out.println(totalFruit(fruits));
    }

    public static int[] sortedSquares(int[] nums) {
        int left = 0;
        int right = nums.length-1;
        if(nums[right] <= 0){
            while(left <= right){
                int temp = nums[right];
                nums[right] = nums[left] * nums[left];
                nums[left] = temp * temp;
                left++;
                right--;
            }
        }
        while(left <= right){
            int leftPow = nums[left] * nums[left];
            int rightPow = nums[right] * nums[right];
            if(leftPow > rightPow){
                int temp = nums[right];
                nums[right] = leftPow;
                nums[left] = temp;
            }else{
                nums[right] = nums[right] * nums[right];
            }
            right--;
        }
        return nums;
    }


    public static int minSubArrayLen(int target, int[] nums) {
        int start = 0;// 滑动窗口起始位置
        int end = 0;// 滑动窗口的终止位置
        int sum = 0;// 滑动窗口的总和
        int result = Integer.MAX_VALUE;// 要返回的最小结果

        while(end < nums.length) {
            sum += nums[end++];
            while (sum >= target) {
                result = Math.min(result, end - start);
                sum -= nums[start++];
            }
        }
        return result == Integer.MAX_VALUE ? 0 : result ;
    }


//    public static int totalFruit(int[] fruits) {
//        int left = 0;
//        int right = 0;
//        int size = 0;
//        Set<Integer> set = new HashSet<>();
//        while(right < fruits.length){
//            if(set.isEmpty() || set.size() == 1){
//                set.add(fruits[right++]);
//            }
//            while(right < fruits.length && set.contains(fruits[right])){
//                right++;
//            }
//            size = Math.max(size,right - left);
//
//            // 当碰到第一个不一样的数字
//            if(right < fruits.length && set.size() > 1 && !set.contains(fruits[right])){
//                int retain = fruits[right - 1];
//                left = right ;
//                while (left > 1 && fruits[left - 1] == retain){
//                    left--;
//                }
//                if (left > 0){
//                    set.remove(fruits[left - 1]);
//                }
//            }
//        }
//        return size;
//    }


//    public String minWindow(String s, String t) {
//        int left = 0;// 窗口的左区间
//        int right = 0;// 窗口的右区间
//        int minSize = s.length() + 1;//最小覆盖子串长度
//        char[] array1 = s.toCharArray();
//        char[] array2 = t.toCharArray();
//        int[] frequency = new int[128];// t中各个字母出现的频数
//        int[] slippingWindow = new int[128];// 在遍历 s 时,窗口中出现的每个字母的频数
//        int numsCount = 0;// 窗口内部包含了多少个 t中的字符
//        int begin = 0;// 最小滑动窗口的起始下标
//
//        // 统计b中各个字母出现的频数
//        for (char value : array1) {
//            frequency[value]++;
//        }
//
//        while(right < array1.length) {
//
//            if(frequency[array1[right]] == 0) {// 不是 t中的字符
//                right++;
//                continue;
//            }
//            if (slippingWindow[array1[right]] < frequency[array1[right]]) {
//                numsCount++;
//            }
//            slippingWindow[array1[right]]++;
//            right++;
//            while (numsCount == array2.length) {
//                if (right - left < minSize) {
//                    minSize = right - left;
//                    begin = left;
//                }
//                if(frequency[array1[left]] == 0) {// 不是 t中的字符
//                    left++;
//                    continue;
//                }
//                if (slippingWindow[array1[left]] == frequency[array1[left]]) {
//                    numsCount--;
//                }
//                slippingWindow[array1[left]]--;
//                left++;
//            }
//        }
//        return minSize == s.length() + 1 ? "" : s.substring(begin, begin + minSize);
//    }



//    public int[][] generateMatrix(int n) {
//        int[][] ret = new int[n][n];
//        int top = 0;
//        int right = n - 1;
//        int bottom = n - 1;
//        int left = 0;
//        int count = 1;
//
//        while (left < right && top < bottom) {
//
//            // 上
//            for (int i = left; i < right; i++) {
//                ret[top][i] = count++;
//            }
//            // 右
//            for (int i = top; i < bottom; i++) {
//                ret[i][right] = count++;
//            }
//            // 下
//            for (int i = right; i > left; i--) {
//                ret[bottom][i] = count++;
//            }
//            // 左
//            for (int i = bottom; i > top; i--) {
//                ret[i][left] = count++;
//            }
//            top++;
//            right--;
//            bottom--;
//            left++;
//        }
//
//        if (count == n * n) {
//            ret[left][top] = count;
//        }
//        return ret;
//    }
}